#include "initialiseArraysParallel.h"

void initialiseArraysParallel::operator() (const tbb::blocked_range<size_t> &chunk) const //chops the task in chunks
{
	float *localCopyArrayParallel = arrayParallel;//local copy of the array
	for( size_t index_array=chunk.begin(); index_array!=chunk.end(); ++index_array )//iterates from beginning of the chunk to the end
	{
		double inputNumber = static_cast<double>(index_array);
		localCopyArrayParallel[index_array] = sin(inputNumber) * cos(inputNumber);
	}
}

initialiseArraysParallel::initialiseArraysParallel( float arrayParallelCalculation[]) 
:	arrayParallel(arrayParallelCalculation)
{
}